/**
 * 
 */
package com.jushu.storbox.service;

import java.util.List;

import com.jushu.storbox.database.DAOFactory;
import com.jushu.storbox.entities.FileFolderInfo;
import com.huawei.sharedrive.sdk.android.model.response.INodeShare;
import com.huawei.sharedrive.sdk.android.modelV2.response.INodeShareV2;

public class LocalShareINodeService extends AbstractLocalService implements ILocalShareINodeService{

	@Override
	public void insertFolderOrFile(INodeShareV2 nodeShare) {
		// TODO Auto-generated method stub
		DAOFactory.instance(this.getContext()).getShareINodeDao().insertFolderOrFile(nodeShare);
	}

	@Override
	public void updateFolderOrFile(INodeShare nodeShare) {
		// TODO Auto-generated method stub
		DAOFactory.instance(this.getContext()).getShareINodeDao().updateFolderOrFile(nodeShare);
	}

	@Override
	public List<FileFolderInfo> getFileList(String folderId, String ownerId) {
		// TODO Auto-generated method stub
		return DAOFactory.instance(this.getContext()).getShareINodeDao().getFileList(folderId, ownerId);
	}

	@Override
	public void deleteFileOrFolder(String folderId, String ownerId) {
		// TODO Auto-generated method stub
		DAOFactory.instance(this.getContext()).getShareINodeDao().deleteFileOrFolder(folderId,ownerId);
	}

	@Override
	public FileFolderInfo getFileById(String fileID, String ownerBy) {
		// TODO Auto-generated method stub
		return DAOFactory.instance(this.getContext()).getShareINodeDao().getFileById(fileID, ownerBy);
	}
	
	
}
